<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta charset="utf-8">
   <title>Driver/Vendor Page</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>js/script.js"></script>
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="../js/1.js"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';
function confirmDelete(driver_code){
	var x= window.confirm("Are you sure to delete this item?");
	if(x){
		window.location.href = BaseURL + "dv/delete_dv/" + driver_code;
	}	
}
</script>

<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';
function redirect(location){
	window.location.href= location;
}

$(document).ready(function(){
				
	$("#search").keyup(function(){
			var _url= BaseURL + "dv/p_getsearchinfo?dv_company_name=" + this.value;
				$.post(_url,"",callbackdisplay);
			
	});
});

function callbackdisplay(data,status){
		if(status=="success"){
			$("#dv_company_name").val(data.dv_company_name);
					
		}
}
</script>

<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>
<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<body >
	<div class="BodyCover">
 		<div class="ParentContent">
	        <?php require("admin_menu.php"); ?>
			<div class="MenuTab">
    			<div class="MenuBelow"><img src="<?php echo my_url();?>images/below-menu.gif"></div>        
             </div>
            <div class="title">
               <h1>Vendor Contact List</h1>
            </div>                        
			<div class="module-index1">
		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>
  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>
			<a href="<?php echo base_url() . "dv/add_dv/" ?>" >
         	<img src=" <?php echo my_url() ."images/icons/action_add.gif" ?>" style='border:none'/> Add New Data
         </a><br />
            <form action="<?php echo base_url(); ?>dv/SearchCompany" method="post">
				<fieldset>
					<label><b>Search by Company Name:</b></label>
					<input type="text" name="search" id="search" value="" size="20" />
					<input type="submit" value="Search" id="Search" />
				</fieldset>
		    </form>
          <br />	
                <div style='overflow:scroll;width:940px;height:400px;border:1pt solid #000;'>
                <table class='Grid' width='940px' border='1'>
                  <tr>
                        <th >View</th>
                        <th >Edit</th>
                 	    <th nowrap="nowrap">Profile Type</th>
                        <th nowrap="nowrap">Rating</th>
                        <th nowrap="nowrap">Vendor Type</th>
                        <th nowrap="nowrap">Priority</th>
                        <th nowrap="nowrap">Company Name</th>
                        <th nowrap="nowrap">Nick Name</th>
                        <th nowrap="nowrap" colspan='2' >Full Name</th>
                        <th nowrap="nowrap">Address</th>
						<th nowrap="nowrap" >City </th>						
						<th nowrap="nowrap" >State</th>
						<th nowrap="nowrap" >Zipcode </th>                        
                        <th nowrap="nowrap">Phone Number</th>
						<th nowrap="nowrap">Fax Number</th>						
                        <th nowrap="nowrap">ALT Number</th>
						<th nowrap="nowrap">Email</th>
						<th nowrap="nowrap">Trailer Number</th>
                        <th nowrap="nowrap">Type of Truck</th>
						<th nowrap="nowrap">Hazmat</th>
						<th nowrap="nowrap">Wearhousing</th>
						<th nowrap="nowrap">Truck Number</th>                        
                        <th nowrap="nowrap">MC Number</th>
                        <th nowrap="nowrap">DOT No.</th>
                        <th nowrap="nowrap">Insurance Name</th>                                                
                        <th nowrap="nowrap">Insurance Coverage Amount</th>                        
                        <th nowrap="nowrap">Insurance Policy No. </th>                        
                        <th nowrap="nowrap">Insurance Number</th>                        
                        <th nowrap="nowrap">Expiration Date</th>                                                                                                
                       <th nowrap="nowrap">Rep.</th>
                        <th nowrap="nowrap">Comment</th>
                  </tr>
<?php
        		  $_rowClass = 'tr_odd';
                foreach($list_dvs as $row)
                {
                         $profile_type = $row->profile_type;
                         $rating= $row->rating;
                         $vendor_type = $row->vendor_type;						 
                         $priority_no = $row->priority_no;						 
                         $dv_company_name = $row->dv_company_name;
                         $dv_n_name = $row->dv_n_name;
						 $f_name = $row->f_name;
						 $l_name = $row->l_name;
					     $address = $row->address;
                         $city = $row->city;
						 $state = $row->state;
						 $zipcode = $row->zipcode;
						 $cell_phone_num = $row->cell_phone_num;
						 $fax_num = $row->fax_num;
 						 $alt_phone_num = $row->alt_phone_num;
						 $email_add = $row->email_add;
						 $trailer_num = $row->trailer_num;
 						 $type_of_truck = $row->type_of_truck;
						 $hazmat = $row->hazmat;
						 $wearhousing = $row->wearhousing;						 
						 $truck_num = $row->truck_num;						 
					 	 $mc_num = $row->mc_num;
						 $dot_no = $row->dot_no;
  					     $insurance_name = $row->insurance_name;
 						 $i_c_a = $row->i_c_a;
 						 $ins_p_no = $row->ins_p_no;
 						 $insurance_no = $row->insurance_no;
 						 $expr_date = $row->expr_date;						 						 
					 	 $rep = $row->rep;						 
					 	 $dv_comment_box = $row->dv_comment_box;						 
?>					

					<tr class="<?php echo $_rowClass ?>"  <?php echo GetTrEffects() ?> >
                        <td width='5'>
                                <a href="<?php echo base_url() . "dv_loads/view_dv_loads/". $row->driver_code?>" >
                                <img src="<?php echo my_url() . "images/icons/view.gif" ?>" style='border:none'/></a>
						</td>
                        <td width='5'>
                        	<a href="<?php echo base_url() . "dv/edit_dv/" . $row->driver_code ?>">
                            	<img src="<?php echo my_url() . "images/icons/edit.gif" ?>" style='border:none' />
                             </a>
						</td>
                 		<td nowrap="nowrap"><?php echo $profile_type ?></td>
                   		<td nowrap="nowrap"><?php echo $rating?></td>
                        <td nowrap="nowrap"><?php echo $vendor_type?></td>
                        <td nowrap="nowrap"><?php echo $priority_no?></td>
                        <td nowrap="nowrap"><?php echo $dv_company_name?></td>
                        <td nowrap="nowrap"><?php echo $dv_n_name?></td>
                        <td nowrap="nowrap" colspan='2'> <?php echo $f_name.",&nbsp".$l_name?></td>
                        <td nowrap="nowrap"><?php echo $address?></td>
                        <td nowrap="nowrap"> <?php echo $city?></td>
						<td nowrap="nowrap"> <?php echo $state?></td>
					    <td nowrap="nowrap"> <?php echo $zipcode?></td>                        
                        <td nowrap="nowrap"><?php echo $cell_phone_num?></td>
                        <td nowrap="nowrap"><?php echo $fax_num?></td>
                        <td nowrap="nowrap"><?php echo $alt_phone_num?></td>						
						<td nowrap="nowrap"><?php echo $email_add?></td>
  						<td nowrap="nowrap"><?php echo $trailer_num?></td>                        
						<td nowrap="nowrap"><?php echo $type_of_truck?></td>
 						<td nowrap="nowrap"><?php echo $hazmat?></td>                        
						<td nowrap="nowrap"><?php echo $wearhousing?></td>
   						<td nowrap="nowrap"><?php echo $truck_num?></td>
						<td nowrap="nowrap"><?php echo $mc_num?></td>
                        <td nowrap="nowrap"><?php echo $dot_no?></td>
 						<td nowrap="nowrap"><?php echo $insurance_name?></td>                        
 						<td nowrap="nowrap"><?php echo $i_c_a?></td>
 						<td nowrap="nowrap"><?php echo $ins_p_no?></td>
 						<td nowrap="nowrap"><?php echo $insurance_no?></td>
 						<td nowrap="nowrap"><?php echo $expr_date?></td>                                                
						<td nowrap="nowrap"><?php echo $rep?></td>                        
  						<td nowrap="nowrap"><?php echo $dv_comment_box?></td>
                  </tr>
<?php                  
				  if($_rowClass=="tr_odd") $_rowClass="tr_even"; else $_rowClass="tr_odd";     
                 }
?>
                 </table></div> 
    		<br>
           <div class="BodyContent">
            </div>	
		          
		</div><!---end of ParentContent ---->
  <div class="Footer1">	
				<div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>
				   <a href="http://webmartis.com"> <img src="<?php echo my_url();?>images/wmlink.png"></a>
				</div>                
            </div> <!---end of Footer1 ---->
    </div> <!---end of BodyCover ---->
</body>
<?php } ?>
</html>



